﻿<@override name="head">	
<title>新建菜单</title>
<script type="text/javascript" src="${ctx}/assets/js/common/validate.js"></script>
<script type="text/javascript" src="${ctx}/assets/js/back/resources.js"></script>
</@override>	
<@override name="body">
<div id=content_bg>
<#include "/main/home/common.ftl"/>
	<div id= "pagecontent">
		<div id="content">
	   		<div id="navDiv">
				<ul id="navDiv_ul">
					<li><i class="icon-home"></i></li>
					<li><a href="${ctx}/back/main/dashboard">首页</a></li>
					<li><i class="icon-angle-right"></i></li>
					<li><a href="${ctx}/back/main/resources/list">菜单管理</a></li>
					<li><i class="icon-angle-right"></i></li>
					<li class="navDiv_currentLi">新建菜单</li>
				</ul>  
	 		</div>
	 		<form id="validateForm" action="${ctx}/back/main/resources/save" method="post"  onsubmit="return toVaild()">
				<div class="input-group">
					<label class="input-label"><span class="lbl-yes">*</span>菜单名称：</label>
					<input class="input-text" name="name" tabindex="1" ><span class="spanVaildate"></span>
				</div>
				<div class="input-group">
					<label class="input-label"><span class="lbl-yes">*</span>菜单标识：</label>
					<input class="input-text" name="resKey" tabindex="1" ><span class="spanVaildate"></span>
				</div>
				<div class="input-group">
					<label class="input-label"><span class="lbl-yes">*</span>菜单url：</label>
					<input class="input-text" name="resUrl" tabindex="1" ><span class="spanVaildate"></span>
				</div>
				<div class="input-group">
					<label class="input-label"><span class="lbl-yes">*</span>菜单描述：</label>
					<input class="input-text" name="description" tabindex="1" ><span class="spanVaildate"></span>
				</div>
				<div class="input-group">
					<label class="input-label parentId"><span class="lbl-yes">*</span>上级菜单：</label>
					<select  name="parentId" >
						<option value =1010>顶级目录</option>
						<#if resourcesList ??>
					    <#list resourcesList as resources>
					       <option value =${resources.id!}>${resources.name!}</option>
					       <#if resources.children ??>
						   <#list resources.children as resourceschildren>
						     	<option value =${resourceschildren.id!} style="margin-left:30px">${resourceschildren.name!}</option>
					       		<#if resourceschildren.children ??>
						  	    <#list resourceschildren.children as resourceschildren_c>
						  	    	<option value =${resourceschildren_c.id!} style="margin-left:60px">${resourceschildren_c.name!}</option>
						  	    </#list>
						        </#if> 
					       </#list>
						   </#if>  
					        
						</#list>
						</#if> 
					</select>
				</div>
				<div class="input-group">
					<label class="input-label"><span class="lbl-yes">*</span>菜单类型：</label>
					<select  name="type" >
					  <option value ="0">目录</option>
					  <option value ="1">菜单</option>
					  <option value="2">按钮</option>
					</select>
				</div>
				<div id="footBtn">
					<button class="btn-save" type="submit">保存</button>
					<button class="btn-cancel" id="btn-cancel-authority" type="button">取消</button>
				</div>
			</form>
		</div>
    </div>
</div>
</@override>
<@extends name="/common/simple.ftl"/>